using System.Collections.Generic;
using PetShop.BusinessEntities;
using PetShop.BusinessEntityManagers;

namespace PetShop.BusinessFacade
{
    public class CatalogFacade
    {
        public CategoryInfo GetCategoryById(string categoryId)
        {
            if (string.IsNullOrEmpty(categoryId))
                return null;
            var dao = new CategoryBO();
            return dao.GetCategoryById(categoryId);
        }


        public List<ProductInfo> GetProductsByCategory(string category)
        {
            if (string.IsNullOrEmpty(category))
                return null;
            var bo = new ProductBO();
            List<ProductInfo> boGetProductsByCategory = bo.GetProductsByCategory(category);
            return boGetProductsByCategory;
        }


        public List<ProductInfo> GetProductsBySearch(string text)
        {
            if (string.IsNullOrEmpty(text))
                return null;
            var bo = new ProductBO();
            List<ProductInfo> boGetProductsBySearch = bo.GetProductsBySearch(text);
            return boGetProductsBySearch;
        }


        public List<ItemInfo> GetItemsByProduct(string productId)
        {
            var bo = new ItemBO();
            List<ItemInfo> boGetItemsByProduct = bo.GetItemsByProduct(productId);
            return boGetItemsByProduct;
        }


        public ItemInfo GetItemInfoById(string itemId)
        {
            var bo = new ItemBO();
            ItemInfo boGetItem = bo.GetItem(itemId);
            return boGetItem;
        }
    }
}